Web Services

Insert a New Record Using External Web Service

Code Customization
Insert a New Record Using External Web Service
Description:

This customization calls a web service to insert data from a web service-based data source. This provides an alternate way to access data than the database stored procedure and inline SQL normally generated by Iron Speed Designer.

This particular customization uses the web service described in the customization Add a Web Service to Your Application. This customization assumes that the web service being called is not in the same application as the current application, making this a realistic example of using a web service for intranet or extranet application integration.

For a Web Application the customization will be added in:

..\<Application Name>\<Table Name>SqlTable.vb

For example: C:\MyApp1\Data Access Layer\ShippersSqlTable.vb


For a Web Site the customization will be added in:

..\<Application Name>\App_Code\<Table Name>SqlTable.vb

For example: C:\MyApp1\App_Code\Data Access Layer\ShippersSqlTable.vb

Procedure:

Step 1:  Open the generated application in Visual Studio.NET.

Step 2:  Add a Web Reference into the project to the Web Service in question.

http://localhost/AppWithWebService/MyWebServiceDirectory/MyWebServiceForTableAccess.asmx

Step 3:  Add a reference to System.Web.Services.dll in the application's CompileApplication.rsp file. This is optional if you are using Visual Studio .NET to compile the application, but is required if you are using VBC to compile application.

.\MyApp\CompileApplication.rsp

Step 4:  Compile the application in Visual Studio .NET.

Step 5:  Use this wizard to override the InsertRecord function.

Step 6:   Add the following imports statement at the top of your <Table Name>SqlTable.vb file

imports <Application Name>.Business

Replace <Application Name> with your application name.

The insert record operations in the application now call the web service's function.

Disclaimer:
Customizations included in this wizard are provided as a sample to demonstrate a feature, and may work only in specific situations. The Iron Speed Designer support team cannot assist in the resolution of problems which may occur as a result of customizing your application or modifying a customization to fit a particular purpose.

Terms of Service Privacy Statement